﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 	
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone">

    <Color x:Key="DefaultColor">#FFFFFFFF</Color>
    
    <!--Implicit style for each TextBlock-->
    <Style TargetType="TextBlock">
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource DefaultColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>
    
    <!--Explicit style for TextBlocks inside a DataTemplate-->
    <Style x:Key="DefaultTB" TargetType="TextBlock">
        <Setter Property="Foreground">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource DefaultColor}" />
            </Setter.Value>
        </Setter>
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

    <Style x:Key="RightyTextBlock" TargetType="TextBlock" BasedOn="{StaticResource DefaultTB}">
        <Setter Property="TextAlignment" Value="Right" />
    </Style>
    
    <Style x:Key="ContactActionElement" TargetType="Canvas">
        <Setter Property="Width" Value="173" />
        <Setter Property="Height" Value="173" />
        <Setter Property="Background" Value="DarkBlue" />
    </Style>
    
    <Style x:Key="ContactActionText" TargetType="TextBlock" BasedOn="{StaticResource RightyTextBlock}">
        <Setter Property="FontSize" Value="50" />        
        <Setter Property="Width" Value="163" />
    </Style>

    <!--Choices: select by commenting/uncommenting the desidered behavior-->    
    <DataTemplate x:Key="PivotTitleTemplate">
        <!--Uncomment the TextBlock if you want text title-->
        <TextBlock Height="35" FontSize="28" Text="contoso. we care." Style="{StaticResource DefaultTB}" />
        
        <!--Uncomment the Image if you want logo title-->
        <!--<Image  Height="35" Source="/Microsoft.ISVApps.MyCompany;component/Images/MyCompanyDefaultLogo.png" HorizontalAlignment="Left" />-->
    </DataTemplate>
    
    <Style x:Key="MainPageGrid" TargetType="Grid">
        <Setter Property="Background">
            <Setter.Value>
                <!--Uncomment the SolidColorBrush if you want solid color-->
                <!--<SolidColorBrush Color="DarkBlue" />-->
                
                <!--Uncomment the LinearGradientBrush if you want gradient background-->
                <LinearGradientBrush EndPoint="0.5,1.5" StartPoint="0.5,0">
                        <GradientStop Color="Blue" Offset="0"/>
                        <GradientStop Color="DarkBlue" Offset="0.567"/>
                    </LinearGradientBrush>
                
                <!--Uncomment the ImageBrush if you want image background-->
                <!--<ImageBrush ImageSource="/Microsoft.ISVApps.MyCompany;component/Images/MyCompanyDefaultBackground.png" />-->
            </Setter.Value>
        </Setter>
    </Style>
    
    <DataTemplate x:Key="JumpListTemplate">
        <Grid Width="440">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="310*" />
                <ColumnDefinition Width="130*" />
            </Grid.ColumnDefinitions>
            <TextBlock Style="{StaticResource RightyTextBlock}" FontSize="24" Margin="20" Grid.Column="0" Text="{Binding JumpTitle}"></TextBlock>
            <Canvas Grid.Column="1" Width="120" Height="120">
                <Canvas.Background>
                    <!--Uncomment this SolidColorBrush if you want solid color-->
                    <!--<SolidColorBrush Color="{Binding JumpColor}" />-->
                    
                    <!--Uncomment this SolidColorBrush if you want standard theme color-->
                    <!--<SolidColorBrush Color="{StaticResource PhoneAccentColor}" />-->
                    
                    <!--Uncomment this SolidColorBrush if you want custom color-->
                    <SolidColorBrush Color="DarkBlue" />
                    <!--Uncomment the LinearGradientBrush if you want gradient background-->
                    <!--<LinearGradientBrush EndPoint="1.5,1.5" StartPoint="0,0">
                        <GradientStop Color="{Binding JumpColor}" Offset="0"/>
                        <GradientStop Color="#000000" Offset="0.567"/>
                    </LinearGradientBrush>-->
                </Canvas.Background>
                <TextBlock Style="{StaticResource RightyTextBlock}" Width="70" FontSize="14" Text="{Binding JumpCode}" Margin="40,90,0,0"></TextBlock>
            </Canvas>
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="ProductsTemplate">
        <StackPanel Margin="0,20,0,0">
            <TextBlock Text="{Binding ProductName}" Style="{StaticResource DefaultTB}" Margin="12,0,12,10" FontWeight="SemiBold"/>
            <TextBlock Text="{Binding ProductDescription}" Style="{StaticResource DefaultTB}" Margin="12,0,12,10" />
            <Image Height="17" Source="/Microsoft.ISVApps.Common;component/Graphic/Separator.png" Stretch="Fill" Width="440"/>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="FeedsTemplate">
        <Button Margin="0,10,0,0" Background="DarkBlue" Command="{Binding GoToUrl}" CommandParameter="{Binding FeedUrl}">
            <StackPanel>
                <TextBlock Text="{Binding FeedDate}" Style="{StaticResource DefaultTB}" FontWeight="Bold" FontSize="26" />
                <TextBlock Text="{Binding FeedTitle}" Style="{StaticResource DefaultTB}" FontSize="20" Margin="12,0,12,10" />                
            </StackPanel>
        </Button>        
    </DataTemplate>

    <DataTemplate x:Key="PivotHeaderTemplate">
        <StackPanel Margin="0,0,0,0">
            <Grid ShowGridLines="False" UseLayoutRounding="True">
                <!--Uncomment for pivot-menu border-->
                <!--<Border BorderThickness="2" CornerRadius="20">
                    <Border.BorderBrush>
                        <SolidColorBrush Color="{StaticResource DefaultColor}"/>
                    </Border.BorderBrush>
                </Border>-->
                <TextBlock Text="{Binding}" Style="{StaticResource DefaultTB}" FontSize="66" Margin="10,2,10,10" />
            </Grid>
        </StackPanel>
    </DataTemplate>

</ResourceDictionary>